﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace EngineOfEvermore.Editor.AnimationEditor.View
{
    partial class MainForm : Form
    {
        IInputListener _inputListener;

        public MainForm()
        {
            InitializeComponent();

            if ( !this.DesignMode )
            {
                throw new Exception( "Use the other constructor" );
            }
        }

        public MainForm( IInputListener inputListener )
        {
            Debug.Assert( inputListener != null );

            InitializeComponent();

            _inputListener = inputListener;
        }

        void _newToolStripMenuItem_Click( object sender, EventArgs e )
        {
            _inputListener.OnNewDocumentClicked();
        }

        void _animationExplorerToolStripMenuItem_Click( object sender, EventArgs e )
        {
            _inputListener.OnShowAnimationExplorerClicked();
        }

        void _mainForm_FormClosing( object sender, FormClosingEventArgs e )
        {
            _inputListener.OnCloseClicked( e );
        }

        void closeToolStripMenuItem_Click( object sender, EventArgs e )
        {
            this.Close();
        }

        void _imageMapViewToolStripMenuItem_Click( object sender, EventArgs e )
        {
            _inputListener.OnShowImageMapViewClicked();
        }
    }
}
